import Api from "../utils/api";
import {
	Toast
} from "../components/public.js";
// 获取首页轮播图
export function getBanner(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/user/smsHomeCarousel/api/n/getList",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
// 获取地区列表
export function getregion(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/hospital/smsRegionInfo/api/n/list",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//热门城市
export function getHotCityList(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/hospital/smsRegionInfo/api/n/getListPopularCities",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		)
	})
}
// 获取医院列表 厦门id350200
export function getDoctorReviews(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/home/show/api/n/getDoctorReviews",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
// 医院信息数据汇总
export function getDataSummary(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/home/show/api/n/getDataSummary",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
// 查询用户搜索历史 ,type:0医生，1文章
export function selectUserSearchHistory(params) {
	params.userId = uni.getStorageSync("userInfo").id || null;
	return new Promise((resolve, reject) => {
		Api.http(
			"/user/userSearchHistoryLog/selectUserSearchHistory",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
// 科室列表
export function getListByTree(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/hospital/medicalDepartmentInfo/api/n/getNodeList",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
// 疾病列表
export function getListByDepartmentId(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/hospital/medicalDiseaseInfo/api/n/getListByDepartmentId",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
// 常见疾病列表
export function getListByCommonStatus(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/api/hospital/medicalDiseaseInfo/api/n/getListByCommonStatus",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//城市医院列表
export function getHospitalList(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/hospital/medicalHospitalInfo/api/n/selectDistrictHospital",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//通过医院找---获取右侧科室列表
export function getHospitalDepartmentsList(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/hospital/medicalDepartmentInfo/api/n/getHospitalDepartmentsList",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//按疾病找医生
export function selectDoctorByDisease(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/hospital/medicalDoctorInfo/api/n/selectDoctorByDisease",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//关键字搜索医生
export function selectDoctorByKeyWord(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/hospital/medicalDoctorInfo/api/n/selectDoctorByKeyWord",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//清空用户搜索历史
export function deleteBatch(params) {
	params.userId = uni.getStorageSync("userInfo").id || null;
	return new Promise((resolve, reject) => {
		Api.http(
			"/user/userSearchHistoryLog/deleteBatch",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//获取热门搜索词
export function getHomeKeyWord(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/keyword/smsKeyWordSetup/api/n/getHomeKeyWord",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//按科室搜索医生
export function selectDoctorByHospital(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/hospital/medicalDoctorInfo/api/n/selectDoctorByHospital",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//医生详情
export function getDoctorDetails(params) {
	params.userId = uni.getStorageSync("userInfo").id || null;
	return new Promise((resolve, reject) => {
		Api.http(
			"/hospital/medicalDoctorInfo/api/n/getDoctorDetails",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
// 医生评论查询
export function selectListByDoctorId(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/hospital/medicalDoctorEvaluate/api/n/selectListByDoctorId",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
// 热门医院
export function gethotHospital(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/hospital/medicalHospitalInfo/api/n/selectQueryList",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
// 获取医生评论标签
export function getdoctorTagList(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/medical/medicalCommentTags/api/n/list",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
// oss上传签名生成
export function policy(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/public/oss/api/n/policy",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//用户评价医生
export function comments(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/hospital/medicalDoctorEvaluate/add",
			"POST",
			params,
			res => {
				resolve(res.data);
			},
			err => {
				reject(err);
			}
		);
	});
}
//添加关注 attentionType 关注类型(0医院 1医生)
export function addFocus(params) {
	params.userId = uni.getStorageSync("userInfo").id || null;
	return new Promise((resolve, reject) => {
		Api.http(
			"/user/userAttentionInfo/addFocus",
			"POST",
			params,
			res => {
				Toast(res.data.message);
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//取消关注 attentionType 关注类型(0医院 1医生)
export function cancelFocus(params) {
	params.userId = uni.getStorageSync("userInfo").id || null;
	return new Promise((resolve, reject) => {
		Api.http(
			"/user/userAttentionInfo/cancelFocus",
			"POST",
			params,
			res => {
				Toast(res.data.message);
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//首页筛选查询
export function getDoctorList(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/hospital/medicalDoctorInfo/api/n/doctorReviewSearch",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//热门圈子
export function getListByPopular(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/group/pusGroupInfo/api/n/getListByPopular",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//用户关注的圈子
export function getListByUserId(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/group/pusGroupInfo/getListByUserId",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//科室圈子
export function Unitcircle(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/group/pusGroupInfo/api/n/getListByDepartmentId",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//加入圈子
export function userJoinGroup(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/group/pusGroupInfo/userJoinGroup",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
// 退出圈子
export function userQuitGroup(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/group/pusGroupInfo/userQuitGroup",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//圈子详情
export function getGroupDetails(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/group/pusGroupInfo/api/n/getGroupDetails",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//查询帖子列表
export function getpostList(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/group/publishInfo/api/n/getListByGroupId",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//查询关注帖子列表
export function getCarePostList(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/group/publishInfo/getListByUserAttention",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//查询帖子详情
export function getPublishInfoDetails(params) {
	params.userId = uni.getStorageSync("userInfo").id || null;
	return new Promise((resolve, reject) => {
		Api.http(
			"/group/publishInfo/api/n/getPublishInfoDetails",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//查询帖子评论
export function getCommentList(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/group/publishInfo/api/n/getCommentList",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					Toast(res.data.message);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//帖子点赞
export function postLike(params) {
	params.userId = uni.getStorageSync("userInfo").id || null;
	return new Promise((resolve, reject) => {
		Api.http(
			"/group/publishInfo/postLike",
			"GET",
			params,
			res => {
				Toast(res.data.message);
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//帖子取消点赞
export function noLike(params) {
	params.userId = uni.getStorageSync("userInfo").id || null;
	return new Promise((resolve, reject) => {
		Api.http(
			"/group/publishInfo/noLike",
			"GET",
			params,
			res => {
				Toast(res.data.message);
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//帖子收藏
export function postCollection(params) {
	params.userId = uni.getStorageSync("userInfo").id || null;
	return new Promise((resolve, reject) => {
		Api.http(
			"/group/publishInfo/postCollection",
			"GET",
			params,
			res => {
				Toast(res.data.message);
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//帖子取消收藏
export function postDelete(params) {
	params.userId = uni.getStorageSync("userInfo").id || null;
	return new Promise((resolve, reject) => {
		Api.http(
			"/group/publishInfo/postDelete",
			"GET",
			params,
			res => {
				Toast(res.data.message);
				if (res.data.code == 200) {
					resolve(res.data.result);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//评论
export function commentsPost(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/group/publishInfo/getPublishInfoDetails",
			"POST",
			params,
			res => {
				Toast(res.data.message);
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//添加好友
export function addMyFriend(params) {
	params.userId = uni.getStorageSync("userInfo").id || null;
	return new Promise((resolve, reject) => {
		Api.http(
			"/user/userFriendRelation/addMyFriend",
			"POST",
			params,
			res => {
				Toast(res.data.message);
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//发布 publishType发帖类型(0普通 1求助)
export function addPublish(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/group/publishInfo/addPublish",
			"POST",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//获取用户帖子
export function getListByUser(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/user/userPublishInfo/getListByUser",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//我的互助
export function getMyAssistanceList(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/user/userPublishInfo/getMyAssistanceList",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//获取用户收藏
export function getMyCollectionList(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/user/userPublishInfo/getMyCollectionList",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//获取系统通知
export function queryPageList(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/notice/smsInfoDetail/api/n/queryPageList",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//我的关注
export function getMyFocusList(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/user/userAttentionInfo/getMyFocusList",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//短信登录
export function loginBySms(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/login/api/n/loginBySms",
			"POST",
			params,
			res => {
				Toast(res.data.message);
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//发送短信
export function sendSms(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/sms/controller/api/n/sendSms",
			"POST",
			params,
			res => {
				Toast(res.data.message);
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//微信登录
export function wxLogin(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/login/api/n/weChatMiniProgramLogin",
			"GET",
			params,
			res => {
				resolve(res.data);
			},
			err => {
				reject(err);
			}
		);
	});
}
//微信绑定手机号
export function weChatBindPhone(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/login/api/n/weChatBindPhone",
			"GET",
			params,
			res => {
				Toast(res.data.message);
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
// 注册
export function registered(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/login/api/n/registered",
			"POST",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//获取健康档案
export function getShowListByUserId(params) {
	params.userId = uni.getStorageSync("userInfo").id || null;
	return new Promise((resolve, reject) => {
		Api.http(
			"/user/userHealthDataInfo/getShowListByUserId",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//登陆用户信息
export function getUserInfo(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/user/medicalUser/getUserInfo",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res);
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//收支明细
export function getCompletedListByUserId(params) {
	params.userId = uni.getStorageSync("userInfo").id || null;
	return new Promise((resolve, reject) => {
		Api.http(
			"/mission/smsMissionSetup/getCompletedListByUserId",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//任务
export function task(params) {
	params.userId = uni.getStorageSync("userInfo").id || null;
	return new Promise((resolve, reject) => {
		Api.http(
			"/mission/smsMissionSetup/getListByUserId",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//问题反馈
export function addfeedback(params) {
	params.userId = uni.getStorageSync("userInfo").id || null;
	return new Promise((resolve, reject) => {
		Api.http(
			"/user/userFeedbackInfo/add",
			"POST",
			params,
			res => {
				resolve(res.data);
			},
			err => {
				reject(err);
			}
		);
	});
}
//医院详情
export function getHospitalDetails(params) {
	params.userId = uni.getStorageSync("userInfo").id || null;
	return new Promise((resolve, reject) => {
		Api.http(
			"/hospital/medicalHospitalInfo/api/n/getHospitalDetails",
			"GET",
			params,
			res => {
				resolve(res.data.result);
			},
			err => {
				reject(err);
			}
		);
	});
}
//用户健康档案展示
export function getuserHealth(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/user/userHealthDataInfo/getShowList",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
/**
 * 获取科室节点列表
 * @param {Object} params
 */
export function test(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/hospital/medicalDepartmentInfo/api/n/getNodeList",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//修改用户健康档案
export function addUserHealth(params) {
	params.userId = uni.getStorageSync("userInfo").id || null;
	return new Promise((resolve, reject) => {
		Api.http(
			"/user/userHealthDataInfo/addUserHealth",
			"POST",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
//获取更多的三级列表
export function getMore(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/hospital/medicalDepartmentInfo/api/n/getTreeLikeList",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result);
				} else {
					reject(res)
				}
			},
			err => {
				reject(err);
			}
		);
	});
}
// 关注病友列表
export function getMyFocusBuddyList(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/user/userAttentionInfo/getMyFocusBuddyList",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			},
			err => {
				reject(err)
			}
		)
	})
}
// 疾病问题答案
export function getOneInfoByDiseaseId(params) {
	return new Promise((resolve, reject) => {
		Api.http(
			"/sms/smsBodyPartsInfo/api/n/listSymptomProblemByDiseaseId",
			"GET",
			params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			},
			err => {
				reject(err)
			}
		)
	})
}
//科室疾病列表
export function getDepartmentDisease(params) {
	return new Promise((resolve, reject) => {
		Api.http("/api/hospital/medicalDiseaseInfo/api/n/getListByDepartmentId", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			},
			err => {
				reject(err)
			})
	})
}
//搜索关键词列表
export function getKeywordByType(params) {
	return new Promise((resolve, reject) => {
		Api.http("/keyword/smsKeyWordSetup/api/n/getKeyWordByType", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//疾病百科列表
export function diseaseWiki(params) {
	return new Promise((resolve, reject) => {
		Api.http("/hospital/disease/glossary/api/n/list", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//添加浏览记录
export function addBrowserHistory(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/userBrowseRecord/add", "POST", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//浏览医生列表
export function browserDoctorList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/userBrowseRecord/queryPageListByBrowseRecord", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//浏览帖子列表
export function browserPostList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/userBrowseRecord/queryPublishPageListByBrowseRecord", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//浏览文章列表
export function browserArticleList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/userBrowseRecord/queryRecoveryPageListByBrowseRecord", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//浏览疾病列表
export function browserDiseaseList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/userBrowseRecord/queryDiseasePageListByBrowseRecord", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//我的推广
export function mySpreadList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/medicalUser/getMyPromotion", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//绑定邀请人
export function bindInviter(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/medicalUser/bindInviter", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//上传文件
export function uploadFile(filePath) {
	return new Promise((resolve, reject) => {
		policy().then(res => {
			let params = {
				key: res.dir + "/" + new Date().getTime(),
				OSSAccessKeyId: res.accessKeyId,
				policy: res.policy,
				signature: res.signature,
				success_action_status: 200,
			}
			const imageUrl = res.host + '/' + params.key
			wx.showLoading({
				title: '上传中...',
				mask: true
			});
			uni.uploadFile({
				url: res.host,
				name: 'file',
				filePath: filePath,
				formData: params,
				success: res => {
					uni.hideLoading()
					resolve(imageUrl)
				},
				fail: err => {
					uni.hideLoading()
					reject(err)
				}
			})
		}).catch(err => {
			reject(err)
		})
	})
}
//陪诊师入驻申请
export function attendantStationed(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/application/add", "POST", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//服务类目分类
export function getServiceCategoryList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/category/api/n/getServiceCategoryList", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//项目列表
export function getServiceItemsListByParam(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/service/items/api/n/getServiceItemsListByParam", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//服务详情
export function getServiceItemsById(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/service/items/api/n/getServiceItemsById", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//入驻申请信息
export function getApplicationByParam(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/application/getApplicationByParam", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//提现记录
export function medicalUserWithdraw(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/medicalUserWithdraw/list", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//陪诊师中心订单列表
export function getOrderPageList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/service/order/getOrderPageList", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
// 陪诊师订单统计表
export function getEscortOrderStatistics(params) {
	return new Promise((resolve, reject) => {
		Api.http("/service/order/getEscortOrderStatistics", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//陪诊师列表
export function getEscortList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/info/api/n/list", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//就诊人列表
export function getPatientList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/patient/list", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//添加就诊人
export function addPatient(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/patient/add", "POST", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//编辑就诊人
export function editPatient(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/patient/edit", "PUT", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
/**
 * 删除就诊人 
 */
export function deletePatient(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/patient/deleteById", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
/**
 * 预约服务 /service/order/add
 */
export function reservationService(params) {
	return new Promise((resolve, reject) => {
		Api.http("/service/order/add", "POST", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//服务开始
export function serviceStart(params) {
	return new Promise((resolve, reject) => {
		Api.http("/service/order/serviceStart", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					uni.showToast({
						title: res.data.message,
						icon: 'none'
					});
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//陪诊师信息
export function getEscortInfo(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/info/getEscortInfo", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//账户信息
export function accountInfo(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/account/accountInfo", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//余额明细
export function accountDetail(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/account/accountDetail", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//修改陪诊师状态
export function updateStatus(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/info/updateStatus", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//订单详情
export function getOrderDetail(params) {
	return new Promise((resolve, reject) => {
		Api.http("/service/order/getOrderDetail", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
/**
 * 获取支付参数
 */
export function getPayParams(params) {
	return new Promise((resolve, reject) => {
		Api.http("/api/z/pay/getPayParam", "POST", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
/**
 * 陪诊师详情
 */
export function getEscortDetail(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/info/getEscortDetail", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//陪诊人服务完成
export function serviceComplete(params) {
	return new Promise((resolve, reject) => {
		Api.http("/service/order/serviceComplete", "POST", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//取消订单
export function cancelOrder(params) {
	return new Promise((resolve, reject) => {
		Api.http("/service/order/cancelOrder", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
/**
 * 陪诊师评价列表 
 */
export function escortCommentList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/service/order/appraisal/list", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//添加评论
export function saveByParam(params) {
	return new Promise((resolve, reject) => {
		Api.http("/service/order/appraisal/saveByParam", "POST", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
/**
 * 公告列表 
 */
export function noticeList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/system/bulletin/api/n/list", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//我的案例
export function getEscortExampleListByParam(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/info/getEscortExampleListByParam", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
/**
 * 公告详情 
 */
export function noticeDetail(params) {
	return new Promise((resolve, reject) => {
		Api.http("/system/bulletin/api/n/detail/" + params.id, "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//添加案例
export function saveEscortExample(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/info/saveEscortExample", "POST", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
/**
 * 陪诊师可预约时间列表
 */
export function escortBookDatetimeList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/working/calendar/getAppointmentList", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
// 获取日历列表
export function getCalendarList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/working/calendar/list", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
// 提交可约时间
export function saveList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/working/calendar/saveList", "POST", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
// 休息
export function restConfig(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/working/calendar/restConfig", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//佣金明细
export function getCommissionDetails(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/userAccountInfo/getCommissionDetails", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//推广订单
export function getPromotionOrderList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/userAccountInfo/getPromotionOrderList", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//推广账户
export function promotionAccount(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/userAccountInfo/promotionAccount", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//推广统计
export function getMyPromotion(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/medicalUser/getMyPromotion", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//问题列表
export function getHelpQuestionList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/sms/commonProblem/api/n/list", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//问题详情
export function getHelpQuestionDetail(params) {
	return new Promise((resolve, reject) => {
		Api.http(`/sms/commonProblem/api/n/queryById/${params.detailId}`, "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//问题分类
export function getProblemCategory(params) {
	return new Promise((resolve, reject) => {
		Api.http("/sms/commonProblem/api/n/queryProblemCategory", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//下单说明
export function orderInstructions(params) {
	return new Promise((resolve, reject) => {
		Api.http("/notice/smsInfoDetail/api/n/list", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//陪诊师提现记录
export function getEscortWithdrawalRecord(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/medicalUserWithdraw/getEscortWithdrawalRecord", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//陪诊师余额-提现
export function escortBalanceWithdrawal(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/medicalUserWithdraw/escortBalanceWithdrawal", "POST", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//用户余额-提现
export function userBalanceWithdrawal(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/medicalUserWithdraw/userBalanceWithdrawal", "POST", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
// 用户积分-提现
export function withdrawSave(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/medicalUserWithdraw/withdrawSave", "POST", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//用户余额-提现
export function getConfig(params) {
	return new Promise((resolve, reject) => {
		Api.http("/pay/config/api/n/getConfig", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//我的排行
export function getMyRanking(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/ranking/getMyRanking", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//排行列表
export function getRankingList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/ranking/list", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//余额提现记录
export function getBalanceWithdrawalRecord(params) {
	return new Promise((resolve, reject) => {
		Api.http("/user/medicalUserWithdraw/getBalanceWithdrawalRecord", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//订单陪诊师分配
export function orderAllocation(params) {
	return new Promise((resolve, reject) => {
		Api.http("/service/order/orderAllocation", "POST", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//派单员-订单列表
export function getPendingServiceOrderList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/service/order/getPendingServiceOrderList", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//订单-陪诊师选择列表
export function getEscortSelectList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/info/getEscortSelectList", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//微信登陆
export function miniLoginByParam(params) {
	return new Promise((resolve, reject) => {
		Api.http("/login/api/n/miniLoginByParam", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//小程序授权-绑定手机
export function wxBindPhone(params) {
	return new Promise((resolve, reject) => {
		Api.http("/login/api/n/bindPhone", "GET", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
//修改就诊时间
export function updateOrderTreatmentTime(params) {
	return new Promise((resolve, reject) => {
		Api.http("/service/order/updateOrderTreatmentTime", "POST", params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
/**
 * 案例列表
 */
export function requestExampleList(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/example/pageList", 'GET', params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
/**
 * 添加案例
 */
export function requestAddExample(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/example/save", 'POST', params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
/**
 * 删除案例
 */
export function requestDeleteExample(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/example/deleteById", 'DELETE', params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
/**
 * 修改案例
 */
export function requestUpdateExample(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/example/update", 'POST', params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}
/**
 * 案例详情
 */
export function requestExampleDetail(params) {
	return new Promise((resolve, reject) => {
		Api.http("/escort/example/getRecordById", 'GET', params,
			res => {
				if (res.data.code == 200) {
					resolve(res.data.result)
				} else {
					reject(res)
				}
			}, err => {
				reject(err)
			})
	})
}